# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[HookProxy.__init__(self, objname, obj)
self._last_time = time.time()
self._file = dafile
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7731a8c>}
nname: 0
n 0(None)[delay = time.time() - self._last_time
print >> self._file, 'time.sleep(%f)' % delay
print >> self._file, 'rval = %s' % self._call_str(name, *args, **kwds)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7731aec>}
nname: 0
n 0(None)[self._last_time = time.time()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb77317ec>}
nname: 6
n 6(None)[__doc__ = 'Proxy with timing support\n    This proxy will dump all method call in file given at instanciation (default to sys.stderr)\n    Each method call is preceded by a time.sleep() with a duration of return of previous method call, and time before the next method call\n    '
def __init__(self, objname, obj, dafile=sys.stderr):
	HookProxy.__init__(self, objname, obj)
	self._last_time = time.time()
	self._file = dafile

def _pre(self, name, *args, **args):
	delay = time.time() - self._last_time
	print >> self._file, 'time.sleep(%f)' % delay
	print >> self._file, 'rval = %s' % self._call_str(name, *args, **kwds)

def _post(self, name, *args, **args):
	self._last_time = time.time()

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb773136c>}
nname: 0
n 0(None)[from __future__ import absolute_import
import sys
import time
from wydvd.hooker import HookProxy
__all__ = ['TimerHookProxy']
class TimerHookProxy(HookProxy):
	__doc__ = 'Proxy with timing support\n    This proxy will dump all method call in file given at instanciation (default to sys.stderr)\n    Each method call is preceded by a time.sleep() with a duration of return of previous method call, and time before the next method call\n    '
	def __init__(self, objname, obj, dafile=sys.stderr):
		HookProxy.__init__(self, objname, obj)
		self._last_time = time.time()
		self._file = dafile

	def _pre(self, name, *args, **args):
		delay = time.time() - self._last_time
		print >> self._file, 'time.sleep(%f)' % delay
		print >> self._file, 'rval = %s' % self._call_str(name, *args, **kwds)

	def _post(self, name, *args, **args):
		self._last_time = time.time()



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb772bc0c>}
from __future__ import absolute_import
import sys
import time
from wydvd.hooker import HookProxy
__all__ = ['TimerHookProxy']
class TimerHookProxy(HookProxy):
	__doc__ = 'Proxy with timing support\n    This proxy will dump all method call in file given at instanciation (default to sys.stderr)\n    Each method call is preceded by a time.sleep() with a duration of return of previous method call, and time before the next method call\n    '
	def __init__(self, objname, obj, dafile=sys.stderr):
		HookProxy.__init__(self, objname, obj)
		self._last_time = time.time()
		self._file = dafile

	def _pre(self, name, *args, **args):
		delay = time.time() - self._last_time
		print >> self._file, 'time.sleep(%f)' % delay
		print >> self._file, 'rval = %s' % self._call_str(name, *args, **kwds)

	def _post(self, name, *args, **args):
		self._last_time = time.time()



